home *** CD-ROM | disk | FTP | other *** search
/ Mastering Microsoft Visual Basic 5 / Mastering Microsoft Visual Basic 5.ISO / sampapps / objectsharing / someobject.cls < prev   
Text File  |  1997-01-27  |  925b  |  41 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "SomeObject"
  6. Attribute VB_GlobalNameSpace = False
  7. Attribute VB_Creatable = False
  8. Attribute VB_PredeclaredId = False
  9. Attribute VB_Exposed = True
  10. Option Explicit
  11. Private strText As String
  12. Implements IStringCase
  13.  
  14. Public Event TextChanged(strValue As String)
  15.  
  16. Public Property Get Text() As String
  17.   Text = strText
  18. End Property
  19.  
  20. Public Property Let Text(ByVal strValue As String)
  21.   strText = strValue
  22.   RaiseEvent TextChanged(strValue)
  23. End Property
  24.  
  25. Public Sub Display()
  26.   MsgBox "The object text is: " & vbCrLf & strText
  27. End Sub
  28.  
  29. Private Sub Class_Initialize()
  30.   ' Initialization Code
  31.   strText = ""
  32. End Sub
  33.  
  34. Public Function IStringCase_LCaseText() As String
  35.   IStringCase_LCaseText = LCase(strText)
  36. End Function
  37.  
  38. Public Function IStringCase_UCaseText() As String
  39.   IStringCase_UCaseText = UCase(strText)
  40. End Function
  41.